# coding=utf-8
"""
Author: Mr.夏末
@Function: 传值与传地址
"""
def func(a1):
    a1 = 2
    print(a1)

# 传值
# a会不会被改成2呢
a = 1
func(a)
print(a)


def func1(a1):
    a1[0] = 2
    print(a1)

# 传地址
# a会不会被改成[2]呢
a = [1]
func(a)
print(a)

print("-------------------")
def func2(ai):
    ai[3] = 2
    print(ai)
#传地址：只针对修改容器变量里面的内容
list01 = [1,2,3,4,5]
func2(list01)
print(list01)